package com.xy;

/**
 * @author 谢阳
 * @version 1.8.0_131
 * @date 2022/6/22 15:04
 * @description
 */
public class DepartmentApprover extends Approver {
    public DepartmentApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest purchaseRequest) {
        if (purchaseRequest.getPrice() <= 5000) {
            System.out.println("请求编号:" + purchaseRequest.getId() + ", 请求金额:" + purchaseRequest.getPrice()
                    + ", 请求类型:" + purchaseRequest.getType()+ ", 被" + name + "处理了...");
        } else {
            approver.processRequest(purchaseRequest);
        }
    }
}
